﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/BaseInfoMaster.master"
    CodeFile="EditConsumerIntegral.aspx.cs" Inherits="EditConsumerIntegral" CodeFileBaseClass="Frame.Pages.BaseInfomationEditBasePage" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="stylesheet" href="../Content/Site.css" />
    <link type="text/css" rel="stylesheet" href="../Content/CodeFormatter.css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1 class="DemoTitle">
        客户[<%= (Frame.Pages.RefrenceContext<DAL.BI_Consumer>.Current==null ? string.Empty:Frame.Pages.RefrenceContext<DAL.BI_Consumer>.Current.Model.CName)%>]消费积分表管理
        <asp:HyperLink ID="Backlink" runat="server" Text="返回"></asp:HyperLink>
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxCallbackPanel ID="QueryCBPanel" ClientInstanceName="QueryPanel" runat="server"
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" OnCallback="QueryCBPanel_Callback">
            <LoadingPanelImage Url="~/App_Themes/DevEx/Web/Loading.gif">
            </LoadingPanelImage>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <PanelCollection>
                <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                    <dx:ASPxRoundPanel ID="Detailpanel" runat="server" Width="600px" HeaderText="客户积分"
                        Font-Size="10pt" CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx"
                        EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px"
                        SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                        <ContentPaddings PaddingBottom="10px" PaddingLeft="7px" PaddingRight="11px" PaddingTop="10px" />
                        <HeaderStyle>
                            <Paddings PaddingBottom="6px" PaddingLeft="7px" PaddingRight="11px" PaddingTop="1px" />
                        </HeaderStyle>
                        <PanelCollection>
                            <dx:PanelContent ID="PanelContent2" runat="server" SupportsDisabledAttribute="True">
                                <table width="100%" style="font-size: 10pt">
                                    <tr>
                                        <td align="center" colspan="6" style="white-space: nowrap">
                                            总体积分情况
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="white-space: nowrap">
                                            累积积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_Cumulative" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                        <td style="white-space: nowrap">
                                            已兑积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_Has" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                        <td style="white-space: nowrap">
                                            未兑积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_Not" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="6" style="white-space: nowrap">
                                            本年积分情况
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="white-space: nowrap">
                                            累积积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_YCumulative" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                        <td style="white-space: nowrap">
                                            已兑积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_YHas" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                        <td style="white-space: nowrap">
                                            未兑积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_YNot" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="6" style="white-space: nowrap">
                                            本月积分情况
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="white-space: nowrap">
                                            累积积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_MCumulative" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                        <td style="white-space: nowrap">
                                            已兑积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_MHas" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                        <td style="white-space: nowrap">
                                            未兑积分:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel ID="View_MNot" Wrap="true" runat="server" Width="100px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                </table>
                            </dx:PanelContent>
                        </PanelCollection>
                    </dx:ASPxRoundPanel>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>
        <div class="Spacer" style="height: 14px;">
        </div>
        注：新增的都为积分兑换记录
        <dx:ASPxGridView ID="gridView" runat="server" Width="100%" AutoGenerateColumns="False"
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" DataSourceID="LSMDSourceMain"
            KeyFieldName="IntergralID" OnRowInserting="gridView_RowInserting" OnRowUpdating="gridView_RowUpdating"
            OnCellEditorInitialize="gridView_CellEditorInitialize">
            <ClientSideEvents EndCallback="function(s,e){QueryPanel.PerformCallback(); }" />
            <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <Columns>
                <dx:GridViewDataTextColumn Name="t_IntergralID" FieldName="IntergralID" VisibleIndex="0"
                    CellStyle-HorizontalAlign="Right" ReadOnly="true" Caption="自动编码">
                    <PropertiesTextEdit Native="true" Width="260px">
                    </PropertiesTextEdit>
                    <EditFormSettings Visible="False"></EditFormSettings>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Name="t_ConsumerHis_id" FieldName="ConsumerHis_id" VisibleIndex="1"
                    CellStyle-HorizontalAlign="Center" Caption="消费记录编号">
                    <PropertiesTextEdit Native="true" Width="260px">
                    </PropertiesTextEdit>
                    <EditFormSettings Visible="False"></EditFormSettings>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataComboBoxColumn Name="t_Consumer_ID" FieldName="Consumer_ID" VisibleIndex="2"
                    CellStyle-HorizontalAlign="Center" Visible="false" Caption="客户编号">
                    <PropertiesComboBox Native="true" Width="260px">
                    </PropertiesComboBox>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataTextColumn Name="t_IntegralNum" FieldName="IntegralNum" VisibleIndex="3"
                    CellStyle-HorizontalAlign="Right" Caption="积分数量">
                    <PropertiesTextEdit Native="true" Width="260px">
                        <MaskSettings Mask="&lt;0..999&gt;"></MaskSettings>
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="积分数量不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataDateColumn Name="t_AddTime" FieldName="AddTime" VisibleIndex="4"
                    CellStyle-HorizontalAlign="Center" Caption="加入时间">
                    <PropertiesDateEdit Width="260px">
                        <CalendarProperties TodayButtonText="今天" ClearButtonText="清楚">
                        </CalendarProperties>
                    </PropertiesDateEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataDateColumn>
                <dx:GridViewDataComboBoxColumn Name="t_Type" FieldName="Type" VisibleIndex="5" CellStyle-HorizontalAlign="Center"
                    Caption="业务类型">
                    <PropertiesComboBox Native="true" ValueType="System.Int32" Width="260px">
                        <Items>
                            <dx:ListEditItem Text="消费" Value="0" />
                            <dx:ListEditItem Text="兑换" Value="1" />
                        </Items>
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataMemoColumn Name="t_Remark" FieldName="Remark" VisibleIndex="6" CellStyle-HorizontalAlign="Left"
                    Caption="备注">
                    <PropertiesMemoEdit Width="300px" Height="100px">
                    </PropertiesMemoEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataMemoColumn>
            </Columns>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
            <SettingsEditing EditFormColumnCount="1" />
        </dx:ASPxGridView>
        <dx:LinqServerModeDataSource ID="LSMDSourceMain" runat="server" EnableDelete="true"
            EnableUpdate="true" EnableInsert="true" ContextTypeName="DAL.CMSDALDataContext"
            TableName="BLI_ConsumerIntegral" />
    </div>
</asp:Content>
